﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Dazzle {
    internal sealed class LogManager {
        public static LogType LogType = LogType.Form;

        public static ILog GetLogger(string name) {
            if (LogType == LogType.File) {
                return new FileLog(name);
            } else if (LogType == LogType.Form) {
                return Log.Instance;
            } else {
                throw new ArgumentException("LogType is not required.");
            }
        }

        public static ILog GetLogger(Type type) {
            if (LogType == LogType.File) {
                return new FileLog(type);
            } else if (LogType == LogType.Form) {
                return Log.Instance;
            } else {
                throw new ArgumentException("LogType is not required.");
            }
        }
    }

    internal enum LogType{
        File,

        Form
    }
}
